package cn.ecnu.common.constant;


public enum Constant {

    // 如果有需要继续添加即可
    OK(0, "success"),
    ERROR(500, "未知错误, 请联系管理员解决"),
    AUTH_ERROR(600, "token错误, 请重新登录"),
    LOGIN_ERROR(610, "密码或者手机号错误"),
    ARGUMENT_INVALID(400, "提交参数错误"),
    NO_USER(601, "用户不存在");
    private Integer code; // 错误码
    private String msg; // 错误信息

    Constant(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
